﻿namespace Shared.Crypto
{
    public interface IPasswordHash
    {
        /// <summary>
        /// 对明文密码进行加密
        /// </summary>
        /// <param name="plainPassword">明文</param>
        /// <returns></returns>
        public string Hash(string plainPassword);

        /// <summary>
        /// 对密码进行验证
        /// </summary>
        /// <param name="plainPassword">明文</param>
        /// <param name="hashedPassword">加密后</param>
        /// <returns></returns>
        public bool Verify(string plainPassword, string hashedPassword);
    }
}
